1. Field of the Invention
The present invention relates to a communication system using a communications port. Particularly, the present invention relates to a communication system using a communications port without interrupts. More particularly, the present invention relates to a communication system using a serial communications port in polling mode and without system interrupts in an operating system where available interrupts are already used by other applications. Even more particularly, the present invention relates to a multitasking computer system using a serial communications port in polling mode and without system interrupts in an operating system where available interrupts are already used by other applications.
2. Description of the Prior Art
Since the advent of the computer, computers have been used for data collection and analysis. Communications between computers and peripherals are extremely important to modern computer systems. Today, measuring and observing devices and many other controllers perform a variety of control operations based on microcomputers. Some computers have several independent serial communications ports which operate simultaneously. Peripheral devices attached to the serial communications ports are operated by receiving and transferring the data between the devices and the computer. In the great majority of cases, serial communications are conducted by the use of a serial port configured to the RS-232C standards. In this type of serial communication, there is a one-to-one correspondence between the input and output terminals of a device and the computer for receiving and transferring data.
Current systems are primarily concerned with using priority or multiplexing schemes. These systems require the use of system interrupts to schedule data transfer at given time intervals. In addition, there are methods of using parallel ports (printer ports) in various ways for data acquisition. There are also methods for having a device count for a period of time, but they also rely on using system interrupts. Most data acquisition systems are dedicated systems so that the system can be customized to a particular set of tasks.
U.S. Pat. No. 5,668,716 (1997, Otomo) teaches a controller which performs two-way serial communications between a plurality of devices at one time through a reduced number of data communication lines by use of a serial communication line and serial port adapter connected to a CPU and an external device. The controller includes the CPU, a serial communication device constituting the adapter, and a discriminator. This device connects the various devices in a "daisy chain" scheme. Unlike the Otomo device, the present invention uses a dedicated serial port in polling mode. The present invention also allows other ports to use the available communication port interrupts.
U.S. Pat. No. 5,247,671 (1993, Adkins et al.) teaches a serial communication adapter providing an interface to physical communication ports. A scheduler executing on the adapter schedules tasks at different priority levels, so that time-critical tasks are performed quickly enough to prevent data loss. This device uses various hardware interrupts generated by the system and communications ports to schedule tasks. This device uses priority coding to select the interrupt to be processed. Unlike the Adkins device, the present invention requires neither interrupts nor priority encoding. The present invention operates in polling mode.
In present PC multitasking systems (such as the operating system for Windows 95.RTM.) there are four serial ports available (COM1 through COM4) but only two interrupt lines (IRQ's). This is a hardware constraint. Updating to a new operating system will not easily change this. Moreover, the time resolution conveniently available in these systems is only 55 milliseconds (ms). There is not a readily available time base without reconfiguring the programmable interval timer, a risky and nontrivial task. In a multitasking environment, an application has no way of knowing when it will have another turn if a system interrupt occurs. These considerations make it difficult to measure either time intervals or frequencies accurately. The best one could do is to use a serial port interrupt and then measure the time .+-.55 ms. However, when another application has seized two serial ports, the interrupt is not available. For example, when using a modem to connect to the Internet and using the mouse (unless it is PS2) there are no interrupts available.
Therefore, what is needed is an apparatus that uses a serial communications port without interrupts. What is further needed is an apparatus that uses a serial communications port in polling mode and without interrupts. What is still further needed is an apparatus that uses a serial communications port in polling mode and without interrupts on computer systems which perform arbitrary tasks and is not a dedicated system customized to a particular set of tasks. Yet, what is still further needed is an apparatus that uses a serial communications port in polling mode and without interrupts, and that uses a known time base generated by the computer to produce a pulse which enables a counter to count only during prescribed, active times under program control.